<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateMaterialProjectTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('material_project', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('material_id',false)->default(0)->comment('清单id');
            $table->unsignedBigInteger('admin_id',false)->default(0)->comment('管理员id');
            $table->string('name',120)->comment('项目名称');
            $table->unsignedTinyInteger('listorder',false)->default(0)->comment('排序');
            $table->string('description')->nullable()->comment('项目描述');
            $table->string('file_type',60)->comment('文件类型');
            $table->timestamps();
            $table->softDeletes();
            $table->engine="InnoDb";
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('material_project');
    }
}
